package responsex

type HttpResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"msg"`
	Data    interface{} `json:"data"`
}

func SuccessResponse(resData interface{}, message string) HttpResponse {

	return HttpResponse{Code: 1, Message: message, Data: resData}

}

func FailureResponse(resData interface{}, message string, code int) HttpResponse {
	return HttpResponse{Code: code, Message: message, Data: resData}

}
